﻿
using MicroCenter.Services;

using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;

namespace MicroCenter
{
    public class Program
    {
        public static void Main(string[] args)
        {
            if (SystemctlService.RunCommand(args))
            {
                return;
            }
            CreateHostBuilder(args).Build().Run();
        }

        public static IHostBuilder CreateHostBuilder(string[] args) =>
            Host.CreateDefaultBuilder(args)
                .ConfigureWebHostDefaults(webBuilder =>
                {
                    webBuilder
                    .UseKestrel(options =>
                    {
                        options.Limits.MaxRequestBodySize = null;
                    })
                    .UseStartup<Startup>();
                });


    }
}
